Optical sensor arrangement and method for light sensing

ABSTRACT

An optical sensor arrangement has an integrator, a photodiode for providing a current corresponding to a first polarity, a comparator coupled to the integrator for comparing a voltage with a threshold voltage to provide a comparison output, a reference charge circuit and a control unit. The reference charge circuit is coupled to the integrator for selectively providing first charge packages of a first size or second charge packages of a second size. The control unit is configured to control operation in a calibration phase, in an integration phase and in a residual measurement phase. During the calibration phase, the reference charge circuit provides one of the first charge packages and one or more of the second charge packages to the integrator until the comparison output changes. A reference number is determined corresponding to a number of the second charge packages provided. During the integration phase, the photodiode is connected to the integrator and the reference charge circuit provides one of the first charge packages to the integrator in response to a respective change of the comparison output. An integration number corresponding to a number of the changes of the comparison output is determined. During the residual measurement phase that immediately follows the integration phase, the reference charge circuit provides one or more of the second charge packages to the integrator until the comparison output changes. A residual number corresponding to a number of the second charge packages provided is determined.

BACKGROUND OF THE INVENTION

The present disclosure is related to an optical sensor arrangement andto a method for light sensing.

An optical sensor arrangement often comprises a photodiode as a lightdetector and measures a photocurrent flowing through the photodiode. Theoptical sensor arrangement may convert the photocurrent into a digitalsignal. For example, the optical sensor arrangement may be realized as alight-to-frequency circuit, also called light-to-frequency machine,abbreviated LTF machine. The LTF circuit may generate the digital signalby integrating the photocurrent and comparing the integrated signal witha threshold. An accuracy of the detected digital signal depends onreference values used during integration and comparison.

SUMMARY OF THE INVENTION

The present disclosure provides an improved concept for light sensingwith increased accuracy.

In light-to-frequency conversion, when the photocurrent is integrated,usually each time the integrated signal crosses a threshold value, awell-defined charge package with an opposite polarity compared to thephotocurrent is provided to an input of an integrator for setting theintegration process to a defined state. This process is repeated duringa predefined integration time, and each crossing of the threshold iscounted during an integration phase. The accuracy of the count islimited by the size of the well-defined charge package. The improvedconcept is based on the idea that a second, not necessarily well-definedcharge package is used for determining a residual count of such smallercharge packages between the charging state at the end of the integrationphase and the corresponding threshold value. Such measurement may beperformed in a residual measurement phase that immediately follows theintegration phase. However, in order to avoid the requirement of havinganother well-defined charge package, a relation between the first,well-defined charge package and the second, not well-defined chargepackages can be determined by counting an equivalent number of secondcharge packages to achieve one of the first charge packages. This can bedone in a calibration phase. The calibration phase can be performedbefore an actual measurement, i.e. before an integration phase, or afterthe integration phase, or even independently from an actual measurement.It may be sufficient to perform the calibration only once for a givenseries of integration phases.

For example, an embodiment of an optical sensor arrangement according tothe improved concept comprises an integrator with an integrator inputand an integrator output, a photodiode for providing a currentcorresponding to a first polarity, and a comparator with a comparatorinput coupled to the integrator output. The comparator is configured tocompare a voltage at the comparator input with a threshold value forproviding a comparison output. A reference charge circuit is coupled tothe integrator input for selectively providing first charge packages ofa first size or second charge packages of a second size, wherein thefirst charge packages correspond to a second polarity being opposite ofthe first polarity and the second charge packages correspond to thefirst polarity. For example, the second charge packages are smaller thanthe first charge packages.

In this context, polarity defines the sign of charges provided by therespective elements. For example, the second charge packages correspondto a current having the same polarity as a current provided by thephotodiode.

A control unit of the optical sensor arrangement is configured, during acalibration phase, to control the reference charge circuit to provideone of the first charge packages to the integrator input and to provideone or more of the second charge packages to the integrator input untilthe comparison output changes. The control unit further determines areference number corresponding to a number of the second charge packagesprovided during said calibration phase. During the calibration phase,the control unit may have the photodiode disconnected from theintegrator input. The disconnection may achieve that the referencenumber is not influenced by a photocurrent during counting. However, insome implementations or configurations, the control unit may also beconfigured to keep the photodiode connected to the integrator inputduring the calibration phase, e.g. if the photocurrent is negligibleand/or if switching the photodiode would cause a non-negligible currentcontribution. For example, the calibration phase is short with respectto the time of a regular integration phase.

The control unit is further configured, during an integration phase, toconnect the photodiode to the integrator input, to control the referencecharge circuit to provide one of the first charge packages to theintegrator input in response to a respective change of the comparisonoutput and to determine an integration number corresponding to a numberof said change of the comparison output. Accordingly, for each crossingof the threshold value at the integrator output, one of the first chargepackages is provided and increases a detected number of pulses duringthe integration phase.

The control unit is further configured, during a residual measurementphase that immediately follows the integration phase, to control thereference charge circuit to provide one or more of the second chargepackages to the integrator input until the comparison output changes,and to determine a residual number corresponding to a number of thesecond charge packages provided during the residual measurement phase.The residual number, so to speak, corresponds to what is missing toreach the threshold value when no current is provided from thephotodiode after its disconnection from the integrator input.

The control unit may further be configured to disconnect the photodiodefrom the integrator input during the residual measurement phase. Thedisconnection may achieve that the residual number is not influenced bya photocurrent during counting. However, in some implementations orconfigurations, the control unit may also be configured to keep thephotodiode connected to the integrator input during the residualmeasurement phase, e.g. if the photocurrent is negligible and/or ifswitching the photodiode would cause a non-negligible currentcontribution. For example, the residual measurement phase is short withrespect to the time of the integration phase.

A reason why the finer charge package of the second size is not used forthe normal integration is that this charge is not trimmed and not welldefined over temperature and process. During the calibration phase, thenot well defined charge of the second size is calibrated to the chargepackage of the first size.

For example, the control unit is configured to provide a totalintegration value based on the integration number and a ratio of theresidual number and the reference number. For example, the totalintegration value may consist of an integer value corresponding to theintegration number and a fractional value corresponding to a ratio ofthe difference between the reference number and the residual number, inrelation to the reference number.

For example, the following equation gives the fractional residual, i.e.the missing second charge packages, calibrated to the reference charge,i.e. the first charge packages:

${Residual}{= \frac{\left( {{{reference}\mspace{14mu} {number}} - {{residual}\mspace{14mu} {number}}} \right)}{{reference}\mspace{14mu} {number}}}$

Hence, the accuracy of the total integration value formed from themeasurements made during the integration phase and the residualmeasurement phase is improved to the size of the second, smaller chargepackage. With this concept, it is possible that e.g. an ALS measurementwithin a given integration time is further improved, which isadvantageous while dealing with very low light conditions, e.g. forapplications where the sensor is mounted behind ink in a mobile phonedisplay.

In various embodiments, the integration phase starts with providing oneof the charge packages to the integrator input.

In some implementations, the control unit is configured, during aninitialization phase that immediately precedes the integration phase, topreset the integrator input to a voltage corresponding to the thresholdvalue with a tolerance corresponding to less than the second size.Accordingly, with the defined starting point, the accuracy of theoverall measurement process can be further increased.

For example, the control unit is configured to preset the integratorinput during the initialization phase by charging an integrationcapacitor of the integrator to the threshold value. Hence, no currentfrom the photodiode is lost at the beginning of the integration phase.

In an alternative implementation, the control circuit is configured topreset the integrator input during the initialization phase bycontrolling the reference charge circuit to provide one or more of thefirst charge packages to the integrator input until the comparisonoutput changes a first time, and controlling the reference chargecircuit to provide one or more of the second charge packages to theintegrator input until the comparison output changes a second time.Accordingly, from an undefined starting point, first charge packages areprovided to the integrator input until the threshold value is crossed afirst time. Then, the second charge packages having the oppositepolarity are provided until the threshold value is crossed again,obviously in the opposite direction. Accordingly, with the secondcrossing of the threshold voltage, the integrator input assumes a valuethat is less away from the threshold value than a voltage correspondingto the second size of the second charge packages.

The generation, respectively provision, of the first and second chargepackages can be implemented in several ways. For example, a singlecapacitor can be used that is charged with two different referencevoltages such that two different amounts of charge are stored on acapacitor depending on the respective requirements. In an alternative,two different capacitors are used that are charged with the same ordifferent reference voltages. In each case, two different amounts ofcharge can be controlled to be provided to the integrator input in aswitched fashion.

For example, the reference charge circuit comprises a referencecapacitor, e.g. a single reference capacitor. For providing the firstcharge package, the reference capacitor is charged with a firstreference voltage while the reference capacitor is disconnected from theintegrator input. After the charging, the reference capacitor isconnected to the integrator input such that the amount of charge can betransferred to the integrator input. For providing the second chargepackage, in a similar fashion, the reference capacitor is charged with asecond reference voltage while the reference capacitor is disconnectedfrom the integrator input. After the charging the reference capacitor isconnected to the integrator input for providing the stored charge.

In an alternative implementation, the reference charge circuit comprisesa first and a second reference capacitor. For providing the first chargepackage, the first reference capacitor is charged with a first referencevoltage while the first reference capacitor is disconnected from theintegrator input. After the charging the first reference capacitor isconnected to the integrator input. For providing the second chargepackage, the second reference capacitor is charged with the firstreference voltage or with the second reference voltage while the secondreference capacitor is disconnected from the integrator input. After thecharging, the second reference capacitor is connected to the integratorinput.

For example, the charging and discharging, respectively providing, thestored charge to the integrator input, may be controlled by respectiveswitching signals provided by the control unit. Moreover, the chargingand the provision of the first and second charge packages may be basedon a reference clock signal. Hence, a defined timing is achievedallowing stable operation.

In some implementations, a clock speed of the reference clock signal canbe reduced during the calibration phase and/or the residual measurementphase, in particular compared to the integration phase. This allowsbetter settling of an amplifier that may be employed in the integrator.

In some implementations an amplifier of the integrator is operated in alower noise mode of operation during the calibration phase and/or theresidual measurement phase, in particular compared to the integrationphase. This may further increase the accuracy achieved when operatingthe arrangement with the second charge packages.

As the amplifier can be forced into a low noise mode during the residualmeasurement phase, for example by lowering the bandwidth of theamplifier and/or slowing down clock frequencies, settling of the systemis allowed, without having an impact on the dynamic range during normalintegration time.

In some implementations the control unit is configured to enter thecalibration phase more than once, and to determine a mean value from therespective reference numbers determined in each of said calibrationphases. The mean value can then be used as a final reference number.Accordingly, the ratio between the second charge packages and the firstcharge packages, respectively their sizes, can be determined with ahigher certainty. This further improves the accuracy of the overallmeasurement.

In the various implementations described above, the first size of thefirst charge package may be trimmed while the second size of the secondcharge package is not trimmed. Hence, as only one of the charge packageshas to be trimmed, the effort for having well-defined charge packages isreduced.

In various configurations of such arrangement, where the photodiode isconnected to and disconnected from the integrator input, the switchingprocess may provide additional current to the integrator input that canhave influence on the measurement result, for example during theresidual measurement phase and the calibration phase. To this end, theimproved concept optionally introduces an ON-OFF-compensation phaseduring which the effects of connecting and disconnecting the photodiodeare measured. For example, during such ON-OFF-compensation phase, thecontrol unit controls the reference charge circuit to provide one of thefirst charge packages to the integrator input. Then the control unitfirst connects and then disconnects the photodiode to respectively fromthe integrator input, which may result in an ON-OFF error. Then thecontrol unit controls the reference charge circuit to provide one ormore of the second charge packages to the integrator input until thecomparison output changes. The control unit determines an ON-OFF numbercorresponding to the number of second charge packages provided.

The ON-OFF-compensation phase may be implemented as a combination of ashort integration phase that only allows switching on and off of thephotodiode, together with a residual measurement phase, which providesthe ON-OFF number in this case.

A difference between the reference number of the calibration phase andthe ON-OFF number of the ON-OFF-compensation phase corresponds to theON-OFF error. This numerical representation of the ON-OFF error can betaken into account when providing the total integration value, whichthen is further based on the ON-OFF number respectively the ON-OFFerror.

It has further been found that also internal states like leakagecurrents can influence the measurement result. To take such internalstates like leakage currents into account, the improved concept proposesto measure the leakage currents over a predefined time in terms ofsecond charge packages. The term leakage current is used in thefollowing for summarizing any additional currents appearing at theintegrator input. For example, the leakage current can be integrated fora full integration time respectively a regular integration phase, or adefined portion of such integration time. During such integration, thephotodiode may be disconnected from the integrator input, or thephotodiode may be connected without being exposed to light. Bydisconnecting the photodiode, only internal states resulting from e.g.the electronics can be taken into account.

For example, the integration of the leakage current may be performedduring a leakage integration phase. After the leakage integration phase,a leakage compensation phase may be started that more or lesscorresponds to a residual measurement phase. Accordingly, the controlunit controls the reference charge circuit to provide one or more of thesecond charge packages until the comparison output changes, anddetermines a leakage number corresponding to the number of second chargepackages provided during the leakage compensation phase.

A difference between the reference number of the calibration phase andthe leakage number of the leakage compensation phase corresponds to aninternal error. This numerical representation of the internal error canbe taken into account when providing the total integration value, whichthen is further based on the leakage number respectively the internalerror. For instance, if the leakage integration phase has the samelength as a regular integration phase, the difference value between thereference number and a leakage number can be directly used, assumingthat the same leakage current would have been provided during a regularintegration phase. However, if the leakage integration phase only lastsa portion of the regular integration phase, e.g. half the time, thedifference should be formed from the leakage number multiplied with theratio between regular integration time and the time of the leakageintegration phase, which is two in the present example.

In order to be able to consider as well positive as negative leakagecurrents, one or more of the first charge packages could be provided tothe integrator input during the leakage integration phase, e.g. at thebeginning of the leakage integration phase. Such first charge packagesapparently have to be considered when determining the leakage number.

An arrangement according to one of the embodiments described above canbe used, for example in a mobile device, e.g. a mobile phone, e.g. forambient light sensing. The improved concept e.g. allows an accuratemeasurement even under low lighting conditions where only a smallphotocurrent is provided by a photodiode.

The present disclosure also relates to a light sensing method accordingto the improved concept. Such a method may be performed with anarrangement having a photodiode providing a current corresponding to afirst polarity, an integrator with an integrator input and integratoroutput, and a comparator with a comparator input coupled to theintegrator output, the comparator being configured to compare a voltageat the comparator input with a threshold value for providing acomparison output. The method comprises a calibration phase, anintegration phase and a residual measurement phase.

During the calibration phase, the photodiode may be disconnected fromthe integrator input, one of first charge packages of a first size isprovided to the integrator input, and one or more of second chargepackages of a second size are provided to the integrator input until thecomparison output changes. A reference number corresponding to a numberof the second charge packages is provided, wherein the first chargepackages correspond to a second polarity being opposite of the polarityand the second charge packages correspond to the first polarity.

During the integration phase, the photodiode is connected to theintegrator input, one of the first charge packages is provided to theintegrator input in response to a respective change of the comparisonoutput and an integration number corresponding to a number of saidchanges of the comparison output is determined.

During the residual measurement phase that immediately follows theintegration phase, the photodiode may be disconnected from theintegrator input, one or more of the second charge packages are providedto the integrator input until the comparison output changes, and aresidual number corresponding to a number of the second charge packagesis determined.

The light sensing method may further comprise an initialization phasethat immediately precedes the integration phase. During such aninitialization phase, the integrator input is preset to a voltagecorresponding to the threshold value with a tolerance corresponding toless than the second size.

Further implementations of the method become directly apparent for theskilled person from the various embodiments and implementationsdescribed above for the optical sensor arrangement.

In some implementations of the optical sensor arrangement and the lightsensing method, calibration of the second charge packages with respectto the first charge packages, and performing of the residual measurementcan be omitted, while the second charge packages are used for presettingthe integrator input during the initialization phase. For example, theinitialization phase can be performed both with calibrated second chargepackages and non-calibrated second charge packages.

For example, a corresponding embodiment of an optical sensor arrangementcomprises an integrator with an integrator input and an integratoroutput, a photodiode for providing a current corresponding to a firstpolarity, and a comparator with a comparator input coupled to theintegrator output. The comparator is configured to compare a voltage atthe comparator input with a threshold value for providing a comparisonoutput. A reference charge circuit is coupled to the integrator inputfor selectively providing first charge packages of a first size orsecond charge packages of a second size, wherein the first chargepackages correspond to a second polarity being opposite of the firstpolarity and the second charge packages correspond to the firstpolarity. The second charge packages are smaller than the first chargepackages.

The control unit is configured, during an initialization phase thatimmediately precedes an integration phase, to preset the integratorinput by controlling the reference charge circuit to provide one or moreof the first charge packages to the integrator input until thecomparison output changes a first time, and controlling the referencecharge circuit to provide one or more of the second charge packages tothe integrator input until the comparison output changes a second time.

With respect to the integration phase, it is referred to the descriptionabove.

Accordingly, from an undefined starting point, first charge packages areprovided to the integrator input until the threshold value is crossed afirst time. Then, the second charge packages having the oppositepolarity are provided until the threshold value is crossed again,obviously in the opposite direction. Accordingly, with the secondcrossing of the threshold voltage, the integrator input assumes a valuethat is less away from the threshold value than a voltage correspondingto the second size of the second charge packages. Hence a more accuratestarting value for the integration phase can be achieved.

BRIEF DESCRIPTION OF THE DRAWINGS

The following description of figures of example embodiments may furtherillustrate and explain aspects of the improved concept. Devices andcircuit parts with the same structure and the same effect, respectively,appear with equivalent reference symbols. In so far as devices orcircuit parts correspond to one another in terms of their function indifferent figures, the description thereof is not repeated for each ofthe following figures.

In the drawings:

FIG. 1 shows an example implementation of an optical sensor arrangementaccording to the improved concept,

FIG. 2 shows an example signal diagram of signals in the arrangement ofFIG. 1,

FIG. 3 shows an example implementation of a reference charge circuitaccording to the improved concept,

FIG. 4 shows another example embodiment of a reference charge circuitaccording to the improved concept,

FIG. 5 shows a further example signal diagram of signals in thearrangement of FIG. 1, and

FIG. 6 shows an example detail of an optical sensor arrangementaccording to the improved concept,

FIG. 7 shows a further example signal diagram of signals in thearrangement of FIG. 1, and

FIG. 8 shows a further example signal diagram of signals in thearrangement of FIG. 1.

DETAILED DESCRIPTION

FIG. 1 shows an example embodiment of an optical sensor arrangement 10comprising a photodiode 11, an integrator 12, a comparator 13 and areference charge circuit 14. Arrangement 10 may be used as an LTFmachine 10.

In FIG. 1, a simple block diagram of the LTF machine 10 is illustrated.The integrator 12 comprises an integrator input 15 and an integratoroutput 16. The integrator input 15 is coupled to the photodiode 11. Theintegrator output 16 is connected to a comparator input 18 of thecomparator 13. Moreover, the optical sensor arrangement 10 comprises acontrol circuit 21 having an input coupled to an output of thecomparator 13.

The optical sensor arrangement 10 comprises a first switch 22 that isarranged between the photodiode 11 and the integrator input 15. An anodeof the photodiode 11 is connected to a reference potential terminal 17.A cathode of the photodiode 11 is coupled via the first switch 22 to theintegrator input 15. Moreover, the optical sensor arrangement 10comprises a second switch 23 that couples the photodiode 11 to thereference potential terminal 17. Thus, the second switch 23 couples anode between the first switch 22 and the photodiode 11 to the referencepotential terminal 17. Additionally, a de-charging switch 24 is arrangedbetween the integrator input 15 and the reference potential terminal 17.

Hence the photodiode 11 provides a photocurrent IPD of a first polarityto the integrator input 15.

The integrator 12 comprises an amplifier 26 and an integration capacitor27. An input of the amplifier 26 is directly connected to the integratorinput 15. An output of the amplifier 26 is directly connected to theintegrator output 16. The input of the amplifier 26 may be realized asan inverting input. A further input of the amplifier 26 is connected tothe reference potential terminal 17. The further input of the amplifiermay be realized as a non-inverting input. A first electrode of theintegration capacitor 27 is connected to the integrator input 15 andthus to the input of the amplifier 26. A second electrode of theintegrator capacitor is coupled to the output of the amplifier 26 andthus to the integrator output 16.

The integrator 12 comprises an integrator switch 28. The integratorswitch 28 couples the second electrode of the integrator capacitor 27 tothe output of the amplifier 26 and thus to the integrator output 16. Anode between the integration capacitor 27 and the integrator switch 28is coupled via a further integrator switch 29 to a voltage terminal 30.For example, the voltage terminal 30 may be connected to a second input19 of the comparator 13.

Outputs of the control circuit 21 are connected to the control terminalsof the first switch 22, the second switch 23, the de-charging switch 24,the integrator switch 28 and the further integrator switch 29. Moreover,the control circuit 21 comprises a signal output 49.

A comparator threshold voltage VCT is applied to the second input 19 ofthe comparator 13. The comparator threshold voltage VCT sets acomparator switching point of the comparator 13. The comparatorthreshold voltage VCT may be equal to the comparator switching point.The comparator 13 generates a comparator signal SC. The comparatorsignal SC may be implemented as a light-to-frequency output signal. Thecomparator signal SC is provided to the control circuit 21. The controlcircuit 21 generates an output signal SOUT at the signal output 49 as afunction of the comparator signal SC. The control circuit 21 generatesswitch control signals SW1 to SW5 and provides said control signals tothe control terminals of the switches 22 to 24, 28, 29.

A terminal voltage VC can be tapped at the voltage terminal 30 and isapplied to the further integrator switch 29. A not-shown voltage sourcemay be connected to the voltage terminal 30 and may generate theterminal voltage VC. The voltage source may also be connected to thesecond input 19 of the comparator 13. In this case, the terminal voltageVC may be equal to the comparator threshold voltage VCT.

A reference potential GND can be tapped at the reference potentialterminal 17. The reference potential GND is provided to the furtherinput of the amplifier 26.

A comparator input voltage VIN can be tapped at the integrator output 16and, thus, at the first input 18 of the comparator 13. The comparatorsignal SC is a function of the difference between the comparator inputvoltage VIN and the comparator threshold voltage VCT. If the comparatorinput voltage VIN is higher than the comparator threshold voltage VCT,then the comparator 13 generates the comparator signal SC with a firstlogical value.

The comparator threshold voltage VCT may be different from the terminalvoltage VC.

The reference charge circuit 14 that is coupled to the integrator input15 is configured to selectively providing first charge packages of afirst size or second charge packages of a second size. The first chargepackages correspond to a second polarity being opposite of the firstpolarity of the current provided by the photodiode. The second chargepackages correspond to said first polarity. The provision of first andsecond charge packages is controlled by the control unit 21. Moreover,the generation of the charge packages within the reference chargecircuit 14 can also be controlled by the control unit 21, which will beexplained later in more detail in conjunction with FIG. 3 and FIG. 4.

The control unit 21 can have the optical sensor arrangement 10 to beoperated in different operation phases. For example, during anintegration phase, the control unit 21 connects or keeps connected thephotodiode 11 to the integrator input 15, controls the reference chargecircuit 14 to provide one of the first charge packages to the integratorinput in response to a respective change of the comparison output SC anddetermines an integration number corresponding to a number of saidchanges of the comparison output SC. For example, the number of changesis counted by a counter within the control unit 21.

According to the improved concept, to also cover a residual between avoltage at the integrator input at the end of the integration phase andthe threshold value VCT, the control unit 21, during a residualmeasurement phase that immediately follows the integration phase,controls the reference charge circuit 14 to provide one or more of thesecond charge packages to the integrator input 15 until the comparisonoutput changes. The control unit 21 determines a residual numbercorresponding to a number of said second charge packages provided duringthe residual measurement phase. The control unit 21 e.g. disconnects thephotodiode 11 from the integrator input 15 during the residualmeasurement phase. However, in some implementations or configurations,the control unit 21 may also keep the photodiode 11 connected to theintegrator input 15 during the residual measurement phase, e.g. if thephotocurrent is negligible and/or if switching the photodiode 11 wouldcause a non-negligible current contribution. For example, the residualmeasurement phase is short with respect to the time of the integrationphase.

A ratio between the second size of the second charge packages and thefirst size of the first charge packages is determined in a calibrationphase, during which the photodiode e.g. is disconnected from theintegrator input. In the calibration phase the control unit controls thereference charge circuit to provide one of the first charge packages tothe integrator input 15 and to provide one or more of the second chargepackages to the integrator input 15 until the comparison output SCchanges. The control unit 21 determines a reference number correspondingto a number of the second charge packages provided. However, in someimplementations or configurations, the control unit 21 may also keep thephotodiode 11 connected to the integrator input 15 during thecalibration phase, e.g. if the photocurrent is negligible and/or ifswitching the photodiode 11 would cause a non-negligible currentcontribution. For example, the calibration phase is short with respectto the time of the integration phase.

Referring now to FIG. 2, the different operational phases will beexplained in more detail with the aid of an example signal diagram. Inthis example diagram it is assumed that at the end of an initialization(INIT) phase the integrator 12 is preset such that the signal VIN at theintegrator output 16, respectively the comparator output 18, assumes thethreshold voltage VCT. At the beginning of the integration phase, thatimmediately follows the INIT phase, a first charge package is providedto the integrator input 15 resulting in voltage step, in this example anegative voltage step, of the size REF_CP. The voltage VIN increaseswith provision of the photocurrent IPD to the integrator input 15 untilthe threshold voltage VCT is reached, respectively crossed. In responseto this event, an LTF pulse is generated, as can be seen on the lowerpart of the diagram. Concurrently, a first charge package is provided tobring the voltage VIN down again. The photocurrent of the stillconnected photodiode 11 further increases the voltage VIN, repeating theabove-mentioned process.

It should be noted that the two LTF pulses depicted in the examplediagram of FIG. 2 are only used for easier illustration of the concept,while in practical implementations, depending on an actual photocurrent,many more integration pulses will be generated during a predefinedintegration phase, or even a single LTF pulse. For example, such anintegration phase is determined by a 50 Hz or 60 Hz signal.

At the end of the integration phase, which is a start of the residualmeasurement phase, the voltage VIN is somewhere between a voltageVCT−REF_CP and VCT, forming a residual voltage. Hence, according to theimproved concept, second charge packages of a second size correspondingto a voltage RES_CP are provided from the reference charge circuit 14 tothe integrator input 15 under control of the control unit 21 until thethreshold voltage VCT is reached or crossed. In this example, fourpackages are needed for crossing the threshold voltage VCT. This numberis stored as the residual number. Hence, the integration number and theresidual number allow a more accurate representation of the intensity ofthe photocurrent, respectively the light inducing the photocurrent.

In order to better quantify the residual number, a ratio between thesecond size corresponding to a voltage step RES_CP and the first sizecorresponding to the voltage steps REF_CP is determined in thecalibration phase, which in this example follow the residual measurementphase. However, the calibration phase could also be performed before theinitialization phase or completely independent from an actualmeasurement.

As can be seen from FIG. 2, a first charge package is provided to theintegrator input 15 at the beginning of the calibration phase andseveral second charge packages are provided afterwards until thethreshold value VCT is reached or crossed. In this example, seven secondcharge packages correspond to one of the first charge packages.

FIG. 3 and FIG. 4 show example implementations of a reference chargecircuit 14 for providing the charge packages of the first and secondsize.

In the embodiment of FIG. 3, the reference charge circuit 14 comprises afirst reference capacitor 40 having a first and a second electrode. Afirst reference switch 41 of the reference charge circuit 14 couples thefirst electrode of the first reference capacitor 40 to the integratorinput 15. A second reference switch 42 couples the first electrode ofthe first reference capacitor 40 to a reference terminal 43. Moreover,the reference charge circuit 14 comprises a third reference switch 44coupling the second electrode of the first reference capacitor 40 to thereference terminal 43.

Furthermore, a fourth reference switch 45 of the reference chargecircuit 14 couples the second electrode of the first reference capacitor40 to a reference source terminal 46.

A reference signal AVSS is provided to the reference terminal 43. Thereference signal AVSS may be equal to the reference potential GND. Afirst reference voltage VR1 is provided at the reference source terminal46.

In a similar fashion, the reference charge circuit 14 also comprises asecond reference capacitor 50 having a first and a second electrode. Acorresponding reference switch 51 couples the first electrode of thesecond reference capacitor 50 to the reference terminal 43. Furthermore,switch 52 couples the first electrode of capacitor 50 to the referenceterminal 43, switch 55 couples a second terminal of capacitor 50 to asecond reference source terminal 56, at which a second reference voltageVR2 is provided. A switch 54 couples the second electrode of the secondreference capacitor 50 to the integrator input 15.

For example under control of control circuit 21, respective switchingsignals are provided to the reference charge circuit 14 for charging anddischarging the first and the second reference capacitor 40, 50, whereinthe discharging corresponds to the actual provision of the respectivecharge package to the integrator input 15.

FIG. 4 shows a second embodiment of the reference charge circuit whichuses only one reference capacitor 40 for generating both the first andthe second charge packages. In particular, the circuit around the firstreference capacitor 40 together with switches 41, 42, 44, 45 andreference connections 43 and 46 correspond to the embodiment shown inFIG. 3.

The first reference voltage VR1 is provided by a reference source 60connected between terminal 46 and the reference potential terminal 17.The reference so 60 may be realized as a reference voltage source, e.g.as a band gap circuit. A reference source divider 61 couples thereference source 60 to the reference potential terminal GND andcomprises two divider resistors 62, 63. A tap of the reference sourcedivider 61 is between the two divider resistors 62, 63 and provides asecond reference voltage VR2. The second reference voltage VR2 is hencesmaller than the first reference voltage VR1. Switches 64, 65 provideeither the first reference voltage VR1 or the second reference voltageVR2 as a resulting reference voltage VR.

Further switches 66, 67, 68 and 69 together act as a polarity switch forproviding either the reference signal AVSS or the resulting referencevoltage VR to switches 42, 45, respectively the capacitor 40. Forexample, referring to the implementation of FIG. 3, for achieving theupper circuit parts for providing the first reference voltage VR1,switches 64, 66 and 68 are closed while switches 65, 67 and 69 are open.For providing the second reference voltage VR2, the switching states areinverted, such that switches and 64, 66 and 68 are open while switches65, 67 and 69 are closed.

The charge packages that result from the embodiments shown in FIG. 3 andFIG. 4 depend on the charging voltage, i.e. the reference voltage VR1and/or the reference voltage VR2, and the respective capacitance valuesof the reference capacitors 40, respectively 50. For example, in bothembodiments, the first charge package corresponds to a charge valueQ1=VR1−CREF1, wherein CREF1 is the capacitance value of the referencecapacitor 40.

In the embodiment of FIG. 3, the second charge package has a chargevalue Q2=VR1·CREF2, wherein CREF2 is the capacitance value of thereference capacitor 50. In the embodiment of FIG. 4, the second chargepackage has a charge value Q2=VR2·CREF1. For the embodiment of FIG. 3,the second reference capacitor 50 can also be charged with the firstreference voltage VR1, as the different charge package can result fromthe different capacitance value.

As indicated earlier, the improved concept aims at presetting theintegrator input such that it more or less coincides with the thresholdvalue VCT during an initialization phase immediately preceding theintegration phase. In particular, a difference between the startingvoltage and the threshold voltage VCT should be smaller than a voltagecorresponding to the second size of the second charge package.

Turning now to FIG. 5, a signal diagram is shown demonstrating anexample implementation of how to achieve the desired initialization. Inthis example, starting from an arbitrary starting value that is higherthan the threshold value VCT, one or more of the first charge packages,corresponding to the voltage step REF_CP are provided to the integratorinput 15 until the threshold voltage VCT is crossed, i.e. a first time.Then, one or more of second charge packages corresponding to a voltagestep RES_CP having the opposite polarity are provided to the integratorinput 15 until the comparison output SC changes a second time. As beforethe last of the second charge packages the voltage VIN is below thethreshold value VCT, the voltage VIN can be only one of the secondcharge packages higher, i.e. one voltage step RES_CP higher than thethreshold voltage VCT afterwards. Hence, the starting point for theintegration phase that immediately follow the initialization phase ismore accurately defined. For example, at the beginning of theintegration phase, one of the first charge packages corresponding to thevoltage step REF_CP is provided to the integrator input 15 reducing anerror at the start of the integration phase.

It should be noted that the initialization described in conjunction withFIG. 5 does not necessarily depend on the calibration of the secondcharge packages with respect to the first charge packages. Hence, suchinitialization can be performed before a measurement phase, respectivelyintegration phase, independent of the kind of integration performed,i.e. also without a residual measurement phase.

Referring now to FIG. 6, a detail of the optical sensor arrangement in apossible implementation is shown. For example, a first terminal of theintegration capacitor 27 is connected to the ground terminal via a firstswitch, while the second terminal of the integration capacitor 27 isconnected to a reference terminal within the comparator 13 for providingthe threshold voltage VCT. For instance, the comparator 13 is used as acompensated operational amplifier configured as a buffer. Hence, in theinitialization phase, by closing the respective preset switches, theintegration capacitor 27 respectively the integrator 12 can be preset tothe threshold value VCT. Also in this case, a high accuracy can beachieved and a potential error at the beginning of the integration phasecan be reduced.

In various configurations of such arrangement, where the photodiode 11is connected to and disconnected from the integrator input 15, theswitching process may provide additional current to the integrator input15 that can have influence on the measurement result, for example duringthe residual measurement phase and the calibration phase.

To this end, the improved concept optionally introduces anON-OFF-compensation phase during which the effects of connecting anddisconnecting the photodiode are measured. An example implementation isshown in FIG. 7. For example, during the ON-OFF-compensation phase, thecontrol unit 21 controls the reference charge circuit 14 to provide oneof the first charge packages to the integrator input 15. Then thecontrol unit 21 first connects and then disconnects, or vice versa, thephotodiode 11 to respectively from the integrator input 15, which mayresult in an ON-OFF error. In the drawing, this is shown withcontrolling switch SW3 ON and OFF. Then the control unit 21 controls thereference charge circuit 14 to provide one or more of the second chargepackages to the integrator input 15 until the comparison output changes.The control unit determines an ON-OFF number corresponding to the numberof second charge packages provided, which in this example are eightsecond charge packages.

The ON-OFF-compensation phase may be implemented as a combination of ashort integration phase that only allows switching on and off of thephotodiode, together with a residual measurement phase, which providesthe ON-OFF number in this case.

A difference between the reference number of the calibration phase,which is shown again in FIG. 7 but corresponds to the one shown in FIG.2, and the ON-OFF number of the ON-OFF-compensation phase corresponds tothe ON-OFF error. This numerical representation of the ON-OFF error canbe taken into account when providing the total integration value, whichthen is further based on the ON-OFF number respectively the ON-OFFerror.

It has further been found that also leakage currents can influence themeasurement result. To take such leakage currents into account, theimproved concept proposes to measure the leakage currents over apredefined time in terms of second charge packages. For example, theleakage current can be integrated for a full integration timerespectively a regular integration phase, or a defined portion of suchintegration time. During such integration, the photodiode may bedisconnected from the integrator input, or the photodiode may beconnected without being exposed to light.

For example, FIG. 8 shows an implementation example where theintegration of the leakage current is performed during a leakageintegration phase. After the leakage integration phase, a leakagecompensation phase is started that more or less corresponds to aresidual measurement phase, as for example shown in FIG. 2. Accordingly,the control unit 21 controls the reference charge circuit 14 to provideone or more of the second charge packages to the integrator input 15until the comparison output changes, and determines a leakage numbercorresponding to the number of second charge packages provided duringthe leakage compensation phase, which is ten in the present example.

A difference between the reference number of the calibration phase andthe leakage number of the leakage compensation phase corresponds to aninternal error. This numerical representation of the internal error canbe taken into account when providing the total integration value, whichthen is further based on the leakage number respectively the internalerror. In particular, if the leakage integration phase has the samelength as a regular integration phase, the difference value between thereference number and a leakage number can be directly used, assumingthat the same leakage current would have been provided during a regularintegration phase. However, if the leakage integration phase only lastsa portion of the regular integration phase, e.g. half the time, thedifference should be formed from the leakage number multiplied with theratio between regular integration time and the time of the leakageintegration phase, which is two in the chosen example.

In order to be able to consider as well positive as negative leakagecurrents, one or more of the first charge packages could be provided tothe integrator input 15 during the leakage integration phase, e.g. atthe beginning of the leakage integration phase. Such first chargepackages apparently have to be considered when determining the leakagenumber.

1. An optical sensor arrangement comprising an integrator with anintegrator input and an integrator output; a photodiode for providing acurrent corresponding to a first polarity; a comparator with acomparator input coupled to the integrator output, the comparator beingconfigured to compare a voltage at the comparator input with a thresholdvalue for providing a comparison output; a reference charge circuit thatis coupled to the integrator input for selectively providing firstcharge packages of a first size or second charge packages of a secondsize, wherein the first charge packages correspond to a second polaritybeing opposite of the first polarity and the second charge packagescorrespond to the first polarity; and a control unit that is configuredto, during a calibration phase, control the reference charge circuit toprovide one of the first charge packages to the integrator input and toprovide one or more of the second charge packages to the integratorinput until the comparison output changes, and to determine a referencenumber corresponding to a number of the second charge packages provided;to, during an integration phase, connect the photodiode to theintegrator input, to control the reference charge circuit to provide oneof the first charge packages to the integrator input in response to arespective change of the comparison output and to determine anintegration number corresponding to a number of said changes of thecomparison output; and to, during a residual measurement phase thatimmediately follows the integration phase control the reference chargecircuit to provide one or more of the second charge packages to theintegrator input until the comparison output changes, and to determine aresidual number corresponding to a number of the second charge packagesprovided.
 2. The arrangement of claim 1, wherein the control unit isconfigured to provide a total integration value based on the integrationnumber and a ratio of the residual number and the reference number. 3.The arrangement of claim 1, wherein the integration phase starts withproviding one of the first charge packages to the integrator input. 4.The arrangement of claim 1, wherein the control unit is configured to,during an initialization phase that immediately precedes the integrationphase, preset the integrator input to a voltage corresponding to thethreshold value with a tolerance corresponding to less than the secondsize.
 5. The arrangement of claim 4, wherein the control unit isconfigured to preset the integrator input during the initializationphase by charging an integration capacitor of the integrator to thethreshold value.
 6. The arrangement of claim 4, wherein the control unitis configured to preset the integrator input during the initializationphase by controlling the reference charge circuit to provide one or moreof the first charge packages to the integrator input until thecomparison output changes a first time, and controlling the referencecharge circuit to provide one or more of the second charge packages tothe integrator input until the comparison output changes a second time.7. The arrangement of claim 1, wherein the reference charge circuitcomprises a reference capacitor; for providing the first charge package,the reference capacitor is charged with a first reference voltage whilethe reference capacitor is disconnected from the integrator input, andafter the charging is connected to the integrator input; and forproviding the second charge package, the reference capacitor is chargedwith a second reference voltage while the reference capacitor isdisconnected from the integrator input, and after the charging isconnected to the integrator input.
 8. The arrangement of claim 1,wherein the reference charge circuit comprises a first and a secondreference capacitor; for providing the first charge package, the firstreference capacitor is charged with a first reference voltage while thefirst reference capacitor is disconnected from the integrator input, andafter the charging is connected to the integrator input; and forproviding the second charge package, the second reference capacitor ischarged with the first reference voltage or with a second referencevoltage while the second reference capacitor is disconnected from theintegrator input, and after the charging is connected to the integratorinput.
 9. The arrangement of claim 7, wherein the charging and theprovision of the first and second charge packages are based on areference clock signal.
 10. The arrangement of claim 9, wherein a clockspeed of the reference clock signal is reduced during the calibrationphase and/or the residual measurement phase, in particular compared tothe integration phase.
 11. The arrangement of claim 1, wherein anamplifier of the integrator is operated in a lower noise mode ofoperation during the calibration phase and/or the residual measurementphase, in particular compared to the integration phase.
 12. Thearrangement of claim 1, wherein the control unit is configured to enterthe calibration phase more than once, and to determine a mean value fromthe respective reference numbers determined in each of said calibrationphases, said mean value being used as a final reference number.
 13. Thearrangement of claim 1, wherein the first size of the first chargepackage is trimmed and the second size of the second charge package isnot trimmed.
 14. A light sensing method to be performed with anarrangement having a photodiode providing a current corresponding to afirst polarity, an integrator with an integrator input and an integratoroutput, and a comparator with a comparator input coupled to theintegrator output, the comparator being configured to compare a voltageat the comparator input with a threshold value for providing acomparison output, the method comprising: during a calibration phase,provide one of first charge packages of a first size to the integratorinput and provide one or more of second charge packages of a second sizeto the integrator input until the comparison output changes, anddetermine a reference number corresponding to a number of the secondcharge packages provided, wherein the first charge packages correspondto a second polarity being opposite of the first polarity and the secondcharge packages correspond to the first polarity; during an integrationphase, connect the photodiode to the integrator input, provide one ofthe first charge packages to the integrator input in response to arespective change of the comparison output and determine an integrationnumber corresponding to a number of said changes of the comparisonoutput; and during a residual measurement phase that immediately followsthe integration phase, provide one or more of the second charge packagesto the integrator input until the comparison output changes, and todetermine a residual number corresponding to a number of the secondcharge packages provided.
 15. The method of claim 14, wherein during aninitialization phase that immediately precedes the integration phase,the integrator input is preset to a voltage corresponding to thethreshold value with a tolerance corresponding to less than the secondsize.